package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.hanghai.HangHaiLockStatus;
import com.yanqu.road.entity.activity.hanghai.HangHaiPort;
import com.yanqu.road.entity.activity.hanghai.HangHaiUnionData;
import com.yanqu.road.entity.activity.hanghai.HangHaiUserData;
import com.yanqu.road.entity.activity.hanghai.config.HangHaiGoodsConfig;
import com.yanqu.road.entity.activity.hanghai.config.HangHaiPortConfig;
import com.yanqu.road.entity.activity.hanghai.config.HangHaiShipConfig;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class HangHaiActivityBusiness {

    /**
     * 用户数据
     */

    public static Map<Long, HangHaiUserData> getHangHaiUserDataMap(int activityId) {
        return DaoHelper.getHangHaiUserDataDaoImpl().getHangHaiUserDataMap(activityId);
    }

    public static boolean addHangHaiUserData(HangHaiUserData data) {
        return DaoHelper.getHangHaiUserDataDaoImpl().add(data);
    }

    public static boolean updateHangHaiUserData(HangHaiUserData data) {
        return DaoHelper.getHangHaiUserDataDaoImpl().update(data);
    }

    /**
     * 商会数据
     */

    public static Map<String, HangHaiUnionData> getHangHaiUnionDataMap(int activityId) {
        return DaoHelper.getHangHaiUnionDataDaoImpl().getHangHaiUnionDataMap(activityId);
    }

    public static boolean addHangHaiUnionData(HangHaiUnionData data) {
        return DaoHelper.getHangHaiUnionDataDaoImpl().add(data);
    }

    public static boolean updateHangHaiUnionData(HangHaiUnionData data) {
        return DaoHelper.getHangHaiUnionDataDaoImpl().update(data);
    }

    /**
     * 港口数据
     */

    public static Map<String, Map<Integer, HangHaiPort>> getHangHaiPortMap(int activityId) {
        return DaoHelper.getHangHaiPortDaoImpl().getHangHaiPortMap(activityId);
    }

    public static boolean addHangHaiPort(HangHaiPort data) {
        return DaoHelper.getHangHaiPortDaoImpl().add(data);
    }

    public static boolean updateHangHaiPort(HangHaiPort data) {
        return DaoHelper.getHangHaiPortDaoImpl().update(data);
    }

    /**
     * 锁定状态
     */

    public static HangHaiLockStatus getHangHaiLockStatus(int activityId) {
        return DaoHelper.getHangHaiLockStatusDaoImpl().getHangHaiLockStatus(activityId);
    }

    public static boolean addHangHaiLockStatus(HangHaiLockStatus data) {
        return DaoHelper.getHangHaiLockStatusDaoImpl().add(data);
    }

    public static boolean updateHangHaiLockStatus(HangHaiLockStatus data) {
        return DaoHelper.getHangHaiLockStatusDaoImpl().update(data);
    }

    /**
     * 配置
     */

    public static Map<Integer, HangHaiGoodsConfig> getHangHaiGoodsConfigMap(int activityId) {
        return DaoHelper.getHangHaiGoodsConfigDaoImpl().getHangHaiGoodsConfigMap(activityId);
    }

    public static Map<Integer, HangHaiPortConfig> getHangHaiPortConfigMap(int activityId) {
        return DaoHelper.getHangHaiPortConfigDaoImpl().getHangHaiPortConfigMap(activityId);
    }

    public static List<HangHaiShipConfig> getHangHaiShipConfigMap(int activityId) {
        return DaoHelper.getHangHaiShipConfigDaoImpl().getHangHaiShipConfigList(activityId);
    }
}
